home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
lists
/
qbnovell
/
getnet2.sub
< prev
next >
Wrap
Text File
|
1991-02-05
|
5KB
|
74 lines
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: PROGRAM: GETNET2.SUB :::
'::: AUTHOR: Mike Shaffer :::
'::: DATE: Feb 2, 1991 :::
'::: VERSION: 2.0 :::
'::: PURPOSE: Returns both Novell connection # and :::
'::: network physical address to a QuickBASIC :::
'::: program. :::
'::: REVISIONS: :::
'::: :::
'::: :::
'::: :::
'::: NOTES: This SUB assumes you're using PDQ from :::
'::: Crescent Software. If not (shame on you!) :::
'::: than you can modify the interrupt call to :::
'::: use INT86 as provided with QuickBASIC. :::
'::: :::
'::: :::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
' '
' '
sub GETNET2(conn%,address$) static
' '
dim regs as regtype ' Create type to hold registers
' ' NOTE: regtype is defined in
' ' the PDQ declarations
' ' include. If you're not
' ' using PDQ, you'll
' ' probably want to use
' ' INT86 as provided by
' ' QuickBASIC, in which
' ' case the interrupt
' ' control structure will
' ' be an integer array.
' ' (see the QB docs)
' '
' '
regs.ax = &hDC00 ' AH=&hDC, AL=&h00
' ' Function to get connection#
interrupt &h21,regs ' So we get it! (returned in AL)
conn% = regs.ax and &hFF '
' '
' '
regs.ax = &hEE00 ' AH=&hEE, AL=&h00
' ' Function to get address
interrupt &h21,regs ' So we get it! (returned in
' ' AX/BX/CX
' '
' '
' ' NOTE: I have chosen to
' ' return the connection
' ' # in the form of a
' ' HEX string. You may
' ' modify to return it
' ' as a long integer.
' '
' ' (didn't really need
al = (regs.aX and &hFF) ' to split apart here,
ah = (regs.aX and &hFF00)\256 ' but did in case you
bl = (regs.bX and &hFF) ' want to reassemble
bh = (regs.bX and &hFF00)\256 ' into a long integer!)
cl = (regs.cX and &hFF) '
ch = (regs.cX and &hFF00)\256 '
' '
address$ = hex$(ch) + hex$(cl) +_ '
hex$(bh) + hex$(bl) +_ '
hex$(ah) + hex$(al) '
' '
end sub